home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / CIncludes / NetSprocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  15.6 KB  |  569 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        NetSprocket.h
  3.  
  4.      Contains:    Games Sprockets: NetSprocket interfaces
  5.  
  6.      Version:    Technology:    NetSprocket 1.0.2
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __NETSPROCKET__
  18. #define __NETSPROCKET__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21. #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #if TARGET_OS_MAC
  25. #ifndef __MACTYPES__
  26. #include <MacTypes.h>
  27. #endif
  28. #ifndef __EVENTS__
  29. #include <Events.h>
  30. #endif
  31.  
  32. #include <OpenTransport.h>
  33. #include <OpenTptInternet.h>
  34.  
  35. #endif  /* TARGET_OS_MAC */
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=power
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. #if TARGET_OS_MAC
  60.  
  61. enum {
  62.     kNSpMaxPlayerNameLen        = 31,
  63.     kNSpMaxGroupNameLen            = 31,
  64.     kNSpMaxPasswordLen            = 31,
  65.     kNSpMaxGameNameLen            = 31,
  66.     kNSpMaxDefinitionStringLen    = 255
  67. };
  68.  
  69.  
  70. /* NetSprocket basic types */
  71. typedef struct OpaqueNSpGameReference*     NSpGameReference;
  72. typedef struct OpaqueNSpProtocolReference*  NSpProtocolReference;
  73. typedef struct OpaqueNSpProtocolListReference*  NSpProtocolListReference;
  74. typedef struct OpaqueNSpAddressReference*  NSpAddressReference;
  75. typedef SInt32                             NSpEventCode;
  76. typedef SInt32                             NSpGameID;
  77. typedef SInt32                             NSpPlayerID;
  78. typedef NSpPlayerID                     NSpGroupID;
  79. typedef UInt32                             NSpPlayerType;
  80. typedef SInt32                             NSpFlags;
  81. typedef Str31                             NSpPlayerName;
  82. /* Individual player info */
  83.  
  84.     struct NSpPlayerInfo {
  85.         NSpPlayerID                     id;
  86.         NSpPlayerType                     type;
  87.         Str31                             name;
  88.         UInt32                             groupCount;
  89.         NSpGroupID                         groups[1];
  90.     };
  91.     typedef struct NSpPlayerInfo NSpPlayerInfo;
  92.     
  93. typedef NSpPlayerInfo *                    NSpPlayerInfoPtr;
  94. /* list of all players */
  95.  
  96. struct NSpPlayerEnumeration {
  97.     UInt32                             count;
  98.     NSpPlayerInfoPtr                 playerInfo[1];
  99. };
  100. typedef struct NSpPlayerEnumeration        NSpPlayerEnumeration;
  101. typedef NSpPlayerEnumeration *            NSpPlayerEnumerationPtr;
  102. /* Individual group info */
  103.  
  104. struct NSpGroupInfo {
  105.     NSpGroupID                         id;
  106.     UInt32                             playerCount;
  107.     NSpPlayerID                     players[1];
  108. };
  109. typedef struct NSpGroupInfo                NSpGroupInfo;
  110. typedef NSpGroupInfo *                    NSpGroupInfoPtr;
  111. /* List of all groups */
  112.  
  113. struct NSpGroupEnumeration {
  114.     UInt32                             count;
  115.     NSpGroupInfoPtr                 groups[1];
  116. };
  117. typedef struct NSpGroupEnumeration        NSpGroupEnumeration;
  118. typedef NSpGroupEnumeration *            NSpGroupEnumerationPtr;
  119. /* Topology types */
  120.  
  121. typedef UInt32                             NSpTopology;
  122.  
  123. enum {
  124.     kNSpClientServer            = 0x00000001
  125. };
  126.  
  127. /* Game information */
  128.  
  129. struct NSpGameInfo {
  130.     UInt32                             maxPlayers;
  131.     UInt32                             currentPlayers;
  132.     UInt32                             currentGroups;
  133.     NSpTopology                     topology;
  134.     UInt32                             reserved;
  135.     Str31                             name;
  136.     Str31                             password;
  137. };
  138. typedef struct NSpGameInfo                NSpGameInfo;
  139. /* Structure used for sending and receiving network messages */
  140.  
  141.     struct NSpMessageHeader {
  142.         UInt32                             version;                    /* Used by NetSprocket.  Don't touch this */
  143.         SInt32                             what;                        /* The kind of message (e.g. player joined) */
  144.         NSpPlayerID                     from;                        /* ID of the sender */
  145.         NSpPlayerID                     to;                            /* (player or group) id of the intended recipient */
  146.         UInt32                             id;                            /* Unique ID for this message & (from) player */
  147.         UInt32                             when;                        /* Timestamp for the message */
  148.         UInt32                             messageLen;                    /* Bytes of data in the entire message (including the header) */
  149.     };
  150.     typedef struct NSpMessageHeader NSpMessageHeader;
  151.     
  152. /* NetSprocket-defined message structures */
  153.  
  154. struct NSpErrorMessage {
  155.     NSpMessageHeader                 header;
  156.     OSStatus                         error;
  157. };
  158. typedef struct NSpErrorMessage            NSpErrorMessage;
  159.  
  160. struct NSpJoinRequestMessage {
  161.     NSpMessageHeader                 header;
  162.     Str31                             name;
  163.     Str31                             password;
  164.     UInt32                             theType;
  165.     UInt32                             customDataLen;
  166.     UInt8                             customData[1];
  167. };
  168. typedef struct NSpJoinRequestMessage    NSpJoinRequestMessage;
  169.  
  170. struct NSpJoinApprovedMessage {
  171.     NSpMessageHeader                 header;
  172. };
  173. typedef struct NSpJoinApprovedMessage    NSpJoinApprovedMessage;
  174.  
  175. struct NSpJoinDeniedMessage {
  176.     NSpMessageHeader                 header;
  177.     Str255                             reason;
  178. };
  179. typedef struct NSpJoinDeniedMessage        NSpJoinDeniedMessage;
  180.  
  181. struct NSpPlayerJoinedMessage {
  182.     NSpMessageHeader                 header;
  183.     UInt32                             playerCount;
  184.     NSpPlayerInfo                     playerInfo;
  185. };
  186. typedef struct NSpPlayerJoinedMessage    NSpPlayerJoinedMessage;
  187.  
  188. struct NSpPlayerLeftMessage {
  189.     NSpMessageHeader                 header;
  190.     UInt32                             playerCount;
  191.     NSpPlayerID                     playerID;
  192.     NSpPlayerName                     playerName;
  193. };
  194. typedef struct NSpPlayerLeftMessage        NSpPlayerLeftMessage;
  195.  
  196. struct NSpHostChangedMessage {
  197.     NSpMessageHeader                 header;
  198.     NSpPlayerID                     newHost;
  199. };
  200. typedef struct NSpHostChangedMessage    NSpHostChangedMessage;
  201.  
  202. struct NSpGameTerminatedMessage {
  203.     NSpMessageHeader                 header;
  204. };
  205. typedef struct NSpGameTerminatedMessage    NSpGameTerminatedMessage;
  206. /* Different kinds of messages.  These can NOT be bitwise ORed together */
  207.  
  208. enum {
  209.     kNSpSendFlag_Junk            = 0x00100000,                    /* will be sent (try once) when there is nothing else pending */
  210.     kNSpSendFlag_Normal            = 0x00200000,                    /* will be sent immediately (try once) */
  211.     kNSpSendFlag_Registered        = 0x00400000                    /* will be sent immediately (guaranteed, in order) */
  212. };
  213.  
  214.  
  215. /* Options for message delivery.  These can be bitwise ORed together with each other,
  216.         as well as with ONE of the above */
  217.  
  218. enum {
  219.     kNSpSendFlag_FailIfPipeFull    = 0x00000001,
  220.     kNSpSendFlag_SelfSend        = 0x00000002,
  221.     kNSpSendFlag_Blocking        = 0x00000004
  222. };
  223.  
  224.  
  225. /* Options for Hosting Joining, and Deleting games */
  226.  
  227. enum {
  228.     kNSpGameFlag_DontAdvertise    = 0x00000001,
  229.     kNSpGameFlag_ForceTerminateGame = 0x00000002
  230. };
  231.  
  232. /* Message "what" types */
  233. /* Apple reserves all negative "what" values (anything with bit 32 set) */
  234.  
  235. enum {
  236.     kNSpSystemMessagePrefix        = (long)0x80000000,
  237.     kNSpError                    = kNSpSystemMessagePrefix | 0x7FFFFFFF,
  238.     kNSpJoinRequest                = kNSpSystemMessagePrefix | 0x00000001,
  239.     kNSpJoinApproved            = kNSpSystemMessagePrefix | 0x00000002,
  240.     kNSpJoinDenied                = kNSpSystemMessagePrefix | 0x00000003,
  241.     kNSpPlayerJoined            = kNSpSystemMessagePrefix | 0x00000004,
  242.     kNSpPlayerLeft                = kNSpSystemMessagePrefix | 0x00000005,
  243.     kNSpHostChanged                = kNSpSystemMessagePrefix | 0x00000006,
  244.     kNSpGameTerminated            = kNSpSystemMessagePrefix | 0x00000007
  245. };
  246.  
  247.  
  248. /* Special TPlayerIDs  for sending messages */
  249.  
  250. enum {
  251.     kNSpAllPlayers                = 0x00000000,
  252.     kNSpHostOnly                = (long)0xFFFFFFFF
  253. };
  254.  
  255.  
  256. /* NetSprocket Error Codes */
  257.  
  258. enum {
  259.     kNSpInitializationFailedErr    = -30360,
  260.     kNSpAlreadyInitializedErr    = -30361,
  261.     kNSpTopologyNotSupportedErr    = -30362,
  262.     kNSpPipeFullErr                = -30364,
  263.     kNSpHostFailedErr            = -30365,
  264.     kNSpProtocolNotAvailableErr    = -30366,
  265.     kNSpInvalidGameRefErr        = -30367,
  266.     kNSpInvalidParameterErr        = -30369,
  267.     kNSpOTNotPresentErr            = -30370,
  268.     kNSpOTVersionTooOldErr        = -30371,
  269.     kNSpMemAllocationErr        = -30373,
  270.     kNSpAlreadyAdvertisingErr    = -30374,
  271.     kNSpNotAdvertisingErr        = -30376,
  272.     kNSpInvalidAddressErr        = -30377,
  273.     kNSpFreeQExhaustedErr        = -30378,
  274.     kNSpRemovePlayerFailedErr    = -30379,
  275.     kNSpAddressInUseErr            = -30380,
  276.     kNSpFeatureNotImplementedErr = -30381,
  277.     kNSpNameRequiredErr            = -30382,
  278.     kNSpInvalidPlayerIDErr        = -30383,
  279.     kNSpInvalidGroupIDErr        = -30384,
  280.     kNSpNoPlayersErr            = -30385,
  281.     kNSpNoGroupsErr                = -30386,
  282.     kNSpNoHostVolunteersErr        = -30387,
  283.     kNSpCreateGroupFailedErr    = -30388,
  284.     kNSpAddPlayerFailedErr        = -30389,
  285.     kNSpInvalidDefinitionErr    = -30390,
  286.     kNSpInvalidProtocolRefErr    = -30391,
  287.     kNSpInvalidProtocolListErr    = -30392,
  288.     kNSpTimeoutErr                = -30393,
  289.     kNSpGameTerminatedErr        = -30394,
  290.     kNSpConnectFailedErr        = -30395,
  291.     kNSpSendFailedErr            = -30396,
  292.     kNSpJoinFailedErr            = -30399
  293. };
  294.  
  295.  
  296.  
  297.  
  298. /************************  Initialization  ************************/
  299. EXTERN_API_C( OSStatus )
  300. NSpInitialize                    (UInt32                 inStandardMessageSize,
  301.                                  UInt32                 inBufferSize,
  302.                                  UInt32                 inQElements,
  303.                                  NSpGameID                 inGameID,
  304.                                  UInt32                 inTimeout);
  305.  
  306.  
  307.  
  308.  
  309. /**************************  Protocols  **************************/
  310. /* Programmatic protocol routines */
  311. EXTERN_API_C( OSStatus )
  312. NSpProtocol_New                    (const char *            inDefinitionString,
  313.                                  NSpProtocolReference *    outReference);
  314.  
  315. EXTERN_API_C( void )
  316. NSpProtocol_Dispose                (NSpProtocolReference     inProtocolRef);
  317.  
  318. EXTERN_API_C( OSStatus )
  319. NSpProtocol_ExtractDefinitionString (NSpProtocolReference  inProtocolRef,
  320.                                  char *                    outDefinitionString);
  321.  
  322.  
  323. /* Protocol list routines */
  324. EXTERN_API_C( OSStatus )
  325. NSpProtocolList_New                (NSpProtocolReference     inProtocolRef,
  326.                                  NSpProtocolListReference * outList);
  327.  
  328. EXTERN_API_C( void )
  329. NSpProtocolList_Dispose            (NSpProtocolListReference  inProtocolList);
  330.  
  331. EXTERN_API_C( OSStatus )
  332. NSpProtocolList_Append            (NSpProtocolListReference  inProtocolList,
  333.                                  NSpProtocolReference     inProtocolRef);
  334.  
  335. EXTERN_API_C( OSStatus )
  336. NSpProtocolList_Remove            (NSpProtocolListReference  inProtocolList,
  337.                                  NSpProtocolReference     inProtocolRef);
  338.  
  339. EXTERN_API_C( OSStatus )
  340. NSpProtocolList_RemoveIndexed    (NSpProtocolListReference  inProtocolList,
  341.                                  UInt32                 inIndex);
  342.  
  343. EXTERN_API_C( UInt32 )
  344. NSpProtocolList_GetCount        (NSpProtocolListReference  inProtocolList);
  345.  
  346. EXTERN_API_C( NSpProtocolReference )
  347. NSpProtocolList_GetIndexedRef    (NSpProtocolListReference  inProtocolList,
  348.                                  UInt32                 inIndex);
  349.  
  350.  
  351. /* Helpers */
  352. EXTERN_API_C( NSpProtocolReference )
  353. NSpProtocol_CreateAppleTalk        (ConstStr31Param         inNBPName,
  354.                                  ConstStr31Param         inNBPType,
  355.                                  UInt32                 inMaxRTT,
  356.                                  UInt32                 inMinThruput);
  357.  
  358. EXTERN_API_C( NSpProtocolReference )
  359. NSpProtocol_CreateIP            (InetPort                 inPort,
  360.                                  UInt32                 inMaxRTT,
  361.                                  UInt32                 inMinThruput);
  362.  
  363.  
  364. /***********************  Human Interface  ************************/
  365. typedef CALLBACK_API( Boolean , NSpEventProcPtr )(EventRecord *inEvent);
  366. EXTERN_API_C( NSpAddressReference )
  367. NSpDoModalJoinDialog            (ConstStr31Param         inGameType,
  368.                                  ConstStr255Param         inEntityListLabel,
  369.                                  Str31                     ioName,
  370.                                  Str31                     ioPassword,
  371.                                  NSpEventProcPtr         inEventProcPtr);
  372.  
  373. EXTERN_API_C( Boolean )
  374. NSpDoModalHostDialog            (NSpProtocolListReference  ioProtocolList,
  375.                                  Str31                     ioGameName,
  376.                                  Str31                     ioPlayerName,
  377.                                  Str31                     ioPassword,
  378.                                  NSpEventProcPtr         inEventProcPtr);
  379.  
  380.  
  381. /*********************  Hosting and Joining  **********************/
  382. EXTERN_API_C( OSStatus )
  383. NSpGame_Host                    (NSpGameReference *        outGame,
  384.                                  NSpProtocolListReference  inProtocolList,
  385.                                  UInt32                 inMaxPlayers,
  386.                                  ConstStr31Param         inGameName,
  387.                                  ConstStr31Param         inPassword,
  388.                                  ConstStr31Param         inPlayerName,
  389.                                  NSpPlayerType             inPlayerType,
  390.                                  NSpTopology             inTopology,
  391.                                  NSpFlags                 inFlags);
  392.  
  393. EXTERN_API_C( OSStatus )
  394. NSpGame_Join                    (NSpGameReference *        outGame,
  395.                                  NSpAddressReference     inAddress,
  396.                                  ConstStr31Param         inName,
  397.                                  ConstStr31Param         inPassword,
  398.                                  NSpPlayerType             inType,
  399.                                  void *                    inCustomData,
  400.                                  UInt32                 inCustomDataLen,
  401.                                  NSpFlags                 inFlags);
  402.  
  403. EXTERN_API_C( OSStatus )
  404. NSpGame_EnableAdvertising        (NSpGameReference         inGame,
  405.                                  NSpProtocolReference     inProtocol,
  406.                                  Boolean                 inEnable);
  407.  
  408. EXTERN_API_C( OSStatus )
  409. NSpGame_Dispose                    (NSpGameReference         inGame,
  410.                                  NSpFlags                 inFlags);
  411.  
  412. EXTERN_API_C( OSStatus )
  413. NSpGame_GetInfo                    (NSpGameReference         inGame,
  414.                                  NSpGameInfo *            ioInfo);
  415.  
  416. /**************************  Messaging  **************************/
  417. EXTERN_API_C( OSStatus )
  418. NSpMessage_Send                    (NSpGameReference         inGame,
  419.                                  NSpMessageHeader *        inMessage,
  420.                                  NSpFlags                 inFlags);
  421.  
  422. EXTERN_API_C( NSpMessageHeader *)
  423. NSpMessage_Get                    (NSpGameReference         inGame);
  424.  
  425. EXTERN_API_C( void )
  426. NSpMessage_Release                (NSpGameReference         inGame,
  427.                                  NSpMessageHeader *        inMessage);
  428.  
  429. /* Helpers */
  430. EXTERN_API_C( OSStatus )
  431. NSpMessage_SendTo                (NSpGameReference         inGame,
  432.                                  NSpPlayerID             inTo,
  433.                                  SInt32                 inWhat,
  434.                                  void *                    inData,
  435.                                  UInt32                 inDataLen,
  436.                                  NSpFlags                 inFlags);
  437.  
  438.  
  439. /*********************  Player Information  **********************/
  440. EXTERN_API_C( NSpPlayerID )
  441. NSpPlayer_GetMyID                (NSpGameReference         inGame);
  442.  
  443. EXTERN_API_C( OSStatus )
  444. NSpPlayer_GetInfo                (NSpGameReference         inGame,
  445.                                  NSpPlayerID             inPlayerID,
  446.                                  NSpPlayerInfoPtr *        outInfo);
  447.  
  448. EXTERN_API_C( void )
  449. NSpPlayer_ReleaseInfo            (NSpGameReference         inGame,
  450.                                  NSpPlayerInfoPtr         inInfo);
  451.  
  452. EXTERN_API_C( OSStatus )
  453. NSpPlayer_GetEnumeration        (NSpGameReference         inGame,
  454.                                  NSpPlayerEnumerationPtr * outPlayers);
  455.  
  456. EXTERN_API_C( void )
  457. NSpPlayer_ReleaseEnumeration    (NSpGameReference         inGame,
  458.                                  NSpPlayerEnumerationPtr  inPlayers);
  459.  
  460. EXTERN_API_C( UInt32 )
  461. NSpPlayer_GetRoundTripTime        (NSpGameReference         inGame,
  462.                                  NSpPlayerID             inPlayer);
  463.  
  464. EXTERN_API_C( UInt32 )
  465. NSpPlayer_GetThruput            (NSpGameReference         inGame,
  466.                                  NSpPlayerID             inPlayer);
  467.  
  468.  
  469. /*********************  Group Management  **********************/
  470. EXTERN_API_C( OSStatus )
  471. NSpGroup_New                    (NSpGameReference         inGame,
  472.                                  NSpGroupID *            outGroupID);
  473.  
  474. EXTERN_API_C( OSStatus )
  475. NSpGroup_Dispose                (NSpGameReference         inGame,
  476.                                  NSpGroupID             inGroupID);
  477.  
  478. EXTERN_API_C( OSStatus )
  479. NSpGroup_AddPlayer                (NSpGameReference         inGame,
  480.                                  NSpGroupID             inGroupID,
  481.                                  NSpPlayerID             inPlayerID);
  482.  
  483. EXTERN_API_C( OSStatus )
  484. NSpGroup_RemovePlayer            (NSpGameReference         inGame,
  485.                                  NSpGroupID             inGroupID,
  486.                                  NSpPlayerID             inPlayerID);
  487.  
  488. EXTERN_API_C( OSStatus )
  489. NSpGroup_GetInfo                (NSpGameReference         inGame,
  490.                                  NSpGroupID             inGroupID,
  491.                                  NSpGroupInfoPtr *        outInfo);
  492.  
  493. EXTERN_API_C( void )
  494. NSpGroup_ReleaseInfo            (NSpGameReference         inGame,
  495.                                  NSpGroupInfoPtr         inInfo);
  496.  
  497. EXTERN_API_C( OSStatus )
  498. NSpGroup_GetEnumeration            (NSpGameReference         inGame,
  499.                                  NSpGroupEnumerationPtr * outGroups);
  500.  
  501. EXTERN_API_C( void )
  502. NSpGroup_ReleaseEnumeration        (NSpGameReference         inGame,
  503.                                  NSpGroupEnumerationPtr  inGroups);
  504.  
  505.  
  506. /**************************  Utilities  ***************************/
  507. EXTERN_API_C( NumVersion )
  508. NSpGetVersion                    (void);
  509.  
  510. EXTERN_API_C( void )
  511. NSpClearMessageHeader            (NSpMessageHeader *        inMessage);
  512.  
  513. EXTERN_API_C( UInt32 )
  514. NSpGetCurrentTimeStamp            (NSpGameReference         inGame);
  515.  
  516. EXTERN_API_C( NSpAddressReference )
  517. NSpConvertOTAddrToAddressReference (OTAddress *            inAddress);
  518.  
  519. EXTERN_API_C( OTAddress *)
  520. NSpConvertAddressReferenceToOTAddr (NSpAddressReference  inAddress);
  521.  
  522. EXTERN_API_C( void )
  523. NSpReleaseAddressReference        (NSpAddressReference     inAddress);
  524.  
  525.  
  526. /************************ Advanced/Async routines ****************/
  527. typedef CALLBACK_API( void , NSpCallbackProcPtr )(NSpGameReference inGame, void *inContext, NSpEventCode inCode, OSStatus inStatus, void *inCookie);
  528. EXTERN_API_C( OSStatus )
  529. NSpInstallCallbackHandler        (NSpCallbackProcPtr     inHandler,
  530.                                  void *                    inContext);
  531.  
  532.  
  533. typedef CALLBACK_API( Boolean , NSpJoinRequestHandlerProcPtr )(NSpGameReference inGame, NSpJoinRequestMessage *inMessage, void *inContext, Str255 outReason);
  534. EXTERN_API_C( OSStatus )
  535. NSpInstallJoinRequestHandler    (NSpJoinRequestHandlerProcPtr  inHandler,
  536.                                  void *                    inContext);
  537.  
  538.  
  539. typedef CALLBACK_API( Boolean , NSpMessageHandlerProcPtr )(NSpGameReference inGame, NSpMessageHeader *inMessage, void *inContext);
  540. EXTERN_API_C( OSStatus )
  541. NSpInstallAsyncMessageHandler    (NSpMessageHandlerProcPtr  inHandler,
  542.                                  void *                    inContext);
  543.  
  544.  
  545.  
  546. #endif  /* TARGET_OS_MAC */
  547.  
  548.  
  549. #if PRAGMA_STRUCT_ALIGN
  550.     #pragma options align=reset
  551. #elif PRAGMA_STRUCT_PACKPUSH
  552.     #pragma pack(pop)
  553. #elif PRAGMA_STRUCT_PACK
  554.     #pragma pack()
  555. #endif
  556.  
  557. #ifdef PRAGMA_IMPORT_OFF
  558. #pragma import off
  559. #elif PRAGMA_IMPORT
  560. #pragma import reset
  561. #endif
  562.  
  563. #ifdef __cplusplus
  564. }
  565. #endif
  566.  
  567. #endif /* __NETSPROCKET__ */
  568.  
  569.